package edu.jhu.cs.oose.scheduleit.dao;

import java.util.List;

import edu.jhu.cs.oose.scheduleit.util.DateWrapper;
import edu.jhu.cs.oose.scheduleit.vo.Event;
import edu.jhu.cs.oose.scheduleit.vo.Schedule;
import edu.jhu.cs.oose.scheduleit.vo.UserInfo;
/**
 * The DAO class for Event VO object.
 * @author oosegroup2
 *
 */
public interface EventDao {
	
	/**
	 * Responsible for save an event object into the database
	 * @param event the event object to be saved
	 */
	public void save(Event event);

	/**
	 * Responsible for add the userinfo object into the Event object.
	 * Then save the Event object into the database
	 * @param event the event object to be saved
	 * @param userInfo the UserInfo Object to be added into event
	 */
	public void addJoinedUser(Event event, UserInfo userInfo);
	/**
	 * Responsible for remove the userinfo object from the Event object.
	 * Then update the Event object at the database
	 * @param event the event object to be saved
	 * @param userInfo the UserInfo Object to be added into event
	 */
	public void removeJoinedUser(Event event, UserInfo userInfo);
	/**
	 * Get a list of events between the given start time and the given end time from the given schedule 
	 * @param schedule 
	 * @param startTime
	 * @param endTime
	 * @return an list of events which are fulfill with the given start time and the given end time
	 */
	public List<Event> getEvents(Schedule schedule, DateWrapper startTime, DateWrapper endTime);
	/**
	 * Get a list of of all events of the given schedule
	 * @param schedule
	 * @return a list of all events of the given schedule
	 */
	public List<Event> getEvents(Schedule schedule);
	/**
	 * Count the number of events between the given start time and the given end time from the given schedule 
	 * @param schedule
	 * @param startTime
	 * @param endTime
	 * @return  the number of events between the given start time and the given end time from the given schedule 
	 */
	public int count(Schedule schedule, DateWrapper startTime, DateWrapper endTime);
	/**
	 * Count the number of events of the given schedule
	 * @param schedule
	 * @return the number of events of the given schedule 
	 */
	public int count(Schedule schedule);
	/**
	 * Get the event with the given eventID
	 * @param eventID
	 * @return the event with the given eventID
	 */
	public Event getEvent(int eventID);
    /**
     * Remove the event object from the database 
     * @param event
     */
	public void deleteEvent(Event event);
}
